﻿using DataServer.ApplicationLib.Entities;
using Swimj.Core.DependencyInjection;
using Swimj.DataCore;
using static DataServer.CommonLib.Constants.ApiRoutes;

namespace DataServer.ApplicationLib.Repositories
{
    public interface IDataConfigRepository : IScopedDependency
    {
        Task<Tuple<IEnumerable<DataConfigEntity>, int>> QueryFilterByPageAsync(ConditionCollection conditions,
            int pageIndex, int pageSize);

        Task<Tuple<IEnumerable<DataConfigEntity>, int>> QueryFilterByOrderPageAsync(ConditionCollection conditions,
            string order, string? sort, int pageIndex, int pageSize);

        Task<IEnumerable<DataConfigEntity>> QueryFilterAsync(ConditionCollection conditions);

        Task<DataConfigEntity> GetByCodeAsync(string configCode);

        Task UpdateAsync(DataConfigEntity dataBaseEntity);

        Task<DataConfigEntity> GetAsync(Guid id);

        Task InsertAsync(DataConfigEntity dataBaseEntity);
    }
}